package com.shenmazong.serverwebpoem.service;

import com.shenmazong.serverwebpoem.pojo.TbPoetry;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author 田不平
 * @project server-web-poem
 * @date 2020/3/26 10:26 PM
 * http://www.shenmazong.com
 */
public interface ElasticSearchService {
    void createIndex();
    boolean deleteIndex(String indexName);
    void saveDoc(TbPoetry poetry);
    void saveAll(List<TbPoetry> list);
    Object findText(String keyWorkd);
    Page<TbPoetry> findByWord(String keyWord, Pageable pageable);
}
